home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************
- Copyright (C) AT&T 1993
- All Rights Reserved
-
- Permission to use, copy, modify, and distribute this software and
- its documentation for any purpose and without fee is hereby
- granted, provided that the above copyright notice appear in all
- copies and that both that the copyright notice and this
- permission notice and warranty disclaimer appear in supporting
- documentation, and that the name of AT&T or any of its entities
- not be used in advertising or publicity pertaining to
- distribution of the software without specific, written prior
- permission.
-
- AT&T DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
- IN NO EVENT SHALL AT&T OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
- SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
- IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
- THIS SOFTWARE.
- ****************************************************************/
-
- This is the version of awk described in "The AWK Programming Language",
- by A. V. Aho, B. W. Kernighan, and P. J. Weinberger
- (Addison-Wesley, 1988, ISBN 0-201-07981-X).
- Changes, mostly bug fixes, are listed in FIXES.
- If you distribute this code further, please please please
- distribute FIXES with it. If you find errors, please report
- them to bwk@research.att.com. Thanks.
-
- The program itself is created by
- make
- which should produce a longish sequence of
- messages roughly like this:
-
- yacc -d awk.g.y
-
- conflicts: 43 shift/reduce, 85 reduce/reduce
- cc -g -c y.tab.c
- rm y.tab.c
- mv y.tab.o awk.g.o
- cmp -s y.tab.h prevy.tab.h || (cp y.tab.h prevy.tab.h; echo change maketab)
- prevy.tab.h: No such file or directory
- change maketab
- lex awk.lx.l
- cc -g -c lex.yy.c
- rm lex.yy.c
- mv lex.yy.o awk.lx.o
- cc -g -c b.c
- cc -g -c main.c
- cc -g -c parse.c
- cc maketab.c -o maketab
- ./maketab >proctab.c
- cc -g -c proctab.c
- cc -g -c tran.c
- cc -g -c lib.c
- cc -g -c run.c
- cc -g awk.g.o awk.lx.o b.o main.o parse.o proctab.o tran.o lib.o run.o -lm
-
- This produces an executable a.out; you will eventually
- want to move this to some place like /usr/bin/awk.
-
- The -g option (which generates symbol table information
- for debuggers) can be disabled by removing the line
- CFLAGS = -g
- from the makefile. Alternatively, you might replace
- it by
- CFLAGS = -O
- if your compiler does significant optimization.
-
- NOTE: This version uses ANSI C, as you should also.
-
- The version of malloc that comes with some systems (e.g., IRIX) is
- astonishly slow. If awk seems slow, you might try fixing that.
-